<!DOCTYPE html>
<html>
  <head>
    <title>info_list.html</title>
	
    <meta name="keywords" content="keyword1,keyword2,keyword3">
    <meta name="description" content="this is my page">
    <meta name="content-type" content="text/html; charset=UTF-8">
    
	<!-- index import css start -->
	<link rel="stylesheet" href="../css/bootstrap.min.css">
	<link rel="stylesheet" href="../css/common.css">
	<link rel="stylesheet" href="../css/index.css">
	<link rel="stylesheet" href="../css/footer.css">
	<link rel="stylesheet" href="../css/info_list.css">
	<link rel="stylesheet" href="../css/bootstrap-combined.css">
	<!-- index import css end -->
	
  </head>
  
  <body>

	 <div class="container-fluid divBlock">
		
		<div class="info_list_search_div">
			<span class="info_list_search_h">Search</span>
			<form role="form" action="" id="info_list_search_form">
				<div class="form-group">
					<input type="text" name="" class="form-control info_list_search_input" placeholder="input">
					<button type="submit" class="btn btn-info info_list_search_btn" id="info_list_search_btn">查询</button>
				</div>
			</form>
		</div>
		
	<div class="table-responsive infoTable">
			<table class="table table-striped table-bordered">
				<caption class="text-center">
					<h3>BLOG</h3>
				</caption>
				<thead>
					<tr>
						<td class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
							<input type="checkbox" id="checkAll">
							<button class="btn btn-info" id="info_list_search_btn">删除</button>
						</td>
						<td class="col-lg-6 col-md-6 col-sm-6 col-xs-9">标题</td>
						<td class="col-lg-13 col-md-3 col-sm-3 ">时间</td>
						<td class="col-lg-2 col-md-2 col-sm-2 col-xs-2">操作</td>
					</tr>
				</thead>
				<tbody id="myblog_list_tbody">

						<tr>
							<td class="">
								<input type="checkbox" name="abc" value="">
							</td>
							<td class="">标题
							</td>
							<td class="">时间
							</td>
							<td class="">
								<a href="#">查看</a>|
								<a href="#">编辑</a>|
								<a href="#">删除</a>
							</td>
						</tr>


				</tbody>

			</table>
			<div class="span12">
				<div id="page1"></div>
			</div>
		</div>
	</div>
	<script type="text/javascript" src="../js/jquery.min.js"></script>
	<script type="text/javascript" src="../js/bootstrap.js"></script>
	<script type="text/javascript" src="../js/bootstrap-paginator.js"></script>
	<script type="text/javascript" src="../js/myblog_list.js"></script>
	<script type="text/javascript">
		$(function(){
			
			var path='<%=basePath%>';
			path="localhost:8080/geek/";
			console.log(path);
			/* initPage(path,1,5); */
			refreshBlogTable(path,1,'');
			
			$("#checkAll").bind("click", function() {
				if (this.checked) {
					$("input[type=checkbox]").prop("checked", 'true');
				} else {
					$("input[type=checkbox]").removeAttr("checked");
				}
			});
			
			
		})
		
		/**
			 * 初始化分页插件
			 * @param curPage
			 * @param totalPages 
			 */
			function initPage(path,curPage,totalPages){ 
				var options = {
						currentPage : curPage,
						totalPages : totalPages,
						numberOfPages : 5,  
						size:"normal",
						alignment:"right",  
						/*pageUrl : function(type, page, current) { 
							return path + "/blog_blogList.action?rows=10&page=" + page;
						}*/
						onPageClicked: function(e,originalEvent,type,page){
							refreshBlogListUL(path,page);
			            }
					}
					$('#page1').bootstrapPaginator(options);
			}
		
		function getChecked() {
			var ids="";
			$("input[type=checkbox]").each(function() {
				if ($(this).prop("checked")) {
					ids+=$(this).val()+",";

				} 

			})
			return ids.substr(0,ids.length-1);
		}
	</script>
  </body>
</html>
